package com.codenum.codegenerator;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

/**
* the Urdjhoor type
*/
@SuppressWarnings("ALL")
public class Urdjhoor {


        private static volatile Urdjhoor instance;

        /**
        * 方法MethodMap
        */
        private Map<String, Method> methodMap = new HashMap<>(32);

        private Map<String, Object> saleTypeMap = new HashMap<>(64);

        public static Urdjhoor getInstance() {
            if (instance == null) {
                synchronized (Urdjhoor.class) {
                    if (instance == null) {
                        instance = new Urdjhoor();
                    }
                }
            }
            return instance;
        }


        private Urdjhoor() {

        }



    public  Boolean judgeVzswcaibgy(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeEktiuouyka(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeLjfojqgfzg(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeJifslcwwzw(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeMywsdfnzgz(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeUlpnbnbmlw(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeNmjkzahqyh(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeLazhzkggua(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeWnprybvklz(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeFgyogemeqx(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeKerovywntp(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeAwghwykrkl(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeZkwfwqjbkq(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeGvxdmkidcs(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }

    private String  vzswcaibgy;
    private String  ektiuouyka;
    private String  ljfojqgfzg;
    private String  jifslcwwzw;
    private String  mywsdfnzgz;
    private String  ulpnbnbmlw;
    private String  nmjkzahqyh;
    private String  lazhzkggua;
    private String  wnprybvklz;
    private String  fgyogemeqx;
    private String  kerovywntp;
    private String  awghwykrkl;
    private String  zkwfwqjbkq;
    private String  gvxdmkidcs;


    public void setVzswcaibgy(String vzswcaibgy){
    this.vzswcaibgy = vzswcaibgy;
    }

    public String getVzswcaibgy(){
    return this.vzswcaibgy;
    }
    public void setEktiuouyka(String ektiuouyka){
    this.ektiuouyka = ektiuouyka;
    }

    public String getEktiuouyka(){
    return this.ektiuouyka;
    }
    public void setLjfojqgfzg(String ljfojqgfzg){
    this.ljfojqgfzg = ljfojqgfzg;
    }

    public String getLjfojqgfzg(){
    return this.ljfojqgfzg;
    }
    public void setJifslcwwzw(String jifslcwwzw){
    this.jifslcwwzw = jifslcwwzw;
    }

    public String getJifslcwwzw(){
    return this.jifslcwwzw;
    }
    public void setMywsdfnzgz(String mywsdfnzgz){
    this.mywsdfnzgz = mywsdfnzgz;
    }

    public String getMywsdfnzgz(){
    return this.mywsdfnzgz;
    }
    public void setUlpnbnbmlw(String ulpnbnbmlw){
    this.ulpnbnbmlw = ulpnbnbmlw;
    }

    public String getUlpnbnbmlw(){
    return this.ulpnbnbmlw;
    }
    public void setNmjkzahqyh(String nmjkzahqyh){
    this.nmjkzahqyh = nmjkzahqyh;
    }

    public String getNmjkzahqyh(){
    return this.nmjkzahqyh;
    }
    public void setLazhzkggua(String lazhzkggua){
    this.lazhzkggua = lazhzkggua;
    }

    public String getLazhzkggua(){
    return this.lazhzkggua;
    }
    public void setWnprybvklz(String wnprybvklz){
    this.wnprybvklz = wnprybvklz;
    }

    public String getWnprybvklz(){
    return this.wnprybvklz;
    }
    public void setFgyogemeqx(String fgyogemeqx){
    this.fgyogemeqx = fgyogemeqx;
    }

    public String getFgyogemeqx(){
    return this.fgyogemeqx;
    }
    public void setKerovywntp(String kerovywntp){
    this.kerovywntp = kerovywntp;
    }

    public String getKerovywntp(){
    return this.kerovywntp;
    }
    public void setAwghwykrkl(String awghwykrkl){
    this.awghwykrkl = awghwykrkl;
    }

    public String getAwghwykrkl(){
    return this.awghwykrkl;
    }
    public void setZkwfwqjbkq(String zkwfwqjbkq){
    this.zkwfwqjbkq = zkwfwqjbkq;
    }

    public String getZkwfwqjbkq(){
    return this.zkwfwqjbkq;
    }
    public void setGvxdmkidcs(String gvxdmkidcs){
    this.gvxdmkidcs = gvxdmkidcs;
    }

    public String getGvxdmkidcs(){
    return this.gvxdmkidcs;
    }

    void setMethodMap(Map<String, Method> methodMap) {
        this.methodMap = methodMap;
    }

   void setSaleTypeMap(Map<String, Object> saleTypeMap) {
        this.saleTypeMap = saleTypeMap;
    }

    public Boolean judgeAttributeValue(String saleType, String methodName) {
        try {
            Object saleTypeObject = saleTypeMap.get(saleType);
            String targetMethod = methodName.replace("judge", "get");
            String attr = methodName.replace("judge", "");
            Method method = methodMap.get(targetMethod);
            Object invoke = method.invoke(saleTypeObject);
            return Objects.isNull(invoke) ? Boolean.FALSE : Objects.equals(invoke.toString().toLowerCase(), attr.toLowerCase());
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e.getMessage());
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e.getMessage());
        }
    }

}